To set the buffer swap interval, call glXSwapIntervalSGI(), specifying the minimum number of retraces between buffer swaps in the interval parameter. For example, a value of 2 means that the color buffer is swapped at most every other display retrace.
glXSwapIntervalSGI() affects only buffer swaps for the GLX write drawable for the current context. Note that glXSwapBuffers() may be called with a drawable parameter that is not the current GLX drawable; in this case glXSwapIntervalSGI(), has no effect on that buffer swap.